package com.doradance.view.recyclerview;

import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Description:
 * Author:yong
 * Date:2017-12-21
 */
public abstract class ViewHolderModel<Model> extends RecyclerView.ViewHolder {

    public ViewHolderModel(View itemView) {
        super(itemView);
        bindView();
    }



    protected void bindView() {}

    public abstract void bindModel(Model model);

    @SuppressWarnings("unchecked")
    protected final <T extends View> T findViewById(int id) {
        return (T) itemView.findViewById(id);
    }

}
